{% extends 'base.html' %} {% block title1 %}{% block title2 %}{{
product.name }}{% endblock %}{% endblock %} {% block content %}
{% load i18n %}
<table class="mainRight">
	<tbody>
		<tr>
			<td><img src="{% url wikiproduct.views.download_handler pk=product.image.pk %}"/></td>
		</tr>
		<tr>
			<th scope="row" style="text-align: left;">{% trans "Companie" %}</th>
			<td><a href="/company/{{ product.company.unique_name }}">
			{{ product.company.name }}</a>
			</td>
		</tr>
		<tr>
			<th scope="row" style="text-align: left;">Note environnementale</th>
		</tr>
		<tr>
			<td colspan="2">
				<div class="rating-box">
					<img src="/static/image/rating.png" class="rating-img"/>
					<img src="/static/image/cursor.png" class="cursor" style="top:{% widthratio product.ratings_max_60 60 160 %}px"/>
					<div class="cursor-txt" style="top:{% widthratio product.ratings_max_60 60 160 %}px">{{ product.ratings }}</div>
				</div>
			</td>
		</tr>
		<tr>
			<th scope="row" style="text-align: left;" colspan="2">{% trans "Service consommateur" %}</th>
		</tr>
		<tr>	<td width="200" colspan="2">{{ product.customer_services|linebreaks }}
			</td>
		</tr>


	</tbody>
</table>
<h1>{{ product.name }}</h1>
<div id="content" class="column">{{ product.detail|linebreaks }}</div>
<h2>Ingredients</h2>
<table class="mainRight">
	<tbody>
		<tr>
			<th scope="row" style="text-align: left;">Moyenne des ingredients</th>
			<td>
			&nbsp;
			</td>
		</tr>
		<tr>
			<td>{{ product.ingredient_ratings }} / 100
			</td>
		</tr>
	</tbody>
</table>
{% for productingredient in product.productingredient_set.all %}
<span class="rating" style="background-position: 0px {{ productingredient.ingredient.rating|add:"20" }}px;">
{% if productingredient.ingredient.link %}
<a href="/ingredient/{{ productingredient.ingredient.name }}" >
{% endif %}
	{{ productingredient.ingredient.name|capfirst }} 
{% if productingredient.ingredient.link %}
</a>
{% endif %}
 &nbsp;
</span>
{% endfor %}
<h2>Emballages</h2>
<table class="mainRight">
	<tbody>
		<tr>
			<th scope="row" style="text-align: left;">Moyenne des emballages</th>
			<td>
			&nbsp;
			</td>
		</tr>
		<tr>
			<td>{{ product.packaging_ratings }} / 100
			</td>
		</tr>
	</tbody>
</table>
<ul>
{% for productpackaging in product.productpackaging_set.all %}
<li><a href="/packaging/{{ productpackaging.packaging.name }}">
	{{ productpackaging.packaging.name }}
</a></li>
{% endfor %}
</ul>
<table class="mainRight">
	<tbody>
		<tr>
			<th scope="row" style="text-align: left;">Quantité d'emballage</th>
			<td>
			{{ product.weight_percent }}%
			</td>
		</tr>
	</tbody>
</table>



<form action="/i18n/setlang/" method="get">
<select name="language">
{% for lang in LANGUAGES %}
<option value="{{ lang.0 }}">{{ lang.1 }}</option>
{% endfor %}
</select>
<input type="submit" value="Go" />
</form>
{% endblock %}
